{% extends 'baykeshop/base_site.html' %}

{% load i18n shop_tags %}

{% block content %}
<div class=" has-background-white">
    {% banners_result %}
</div>
    <div class="container mt-4 mb-4">
        {% for cate in cates %}
        <div class="is-flex is-align-items-center is-justify-content-space-between mb-2">
            <div class="">
                <h1 class=" has-text-weight-semibold is-size-5">{{ cate.name }}</h1>
            </div>
            <div class="">
                <a href="{% url 'baykeshop:cate_detail' cate.id %}">更多>></a>
            </div>
        </div>
        <div class="columns is-multiline is-mobile">
            <div class="column is-4-fullhd is-6-tablet is-12-mobile">
                <figure class="image is-4by3">
                    <img src="{{ cate.img_map.url }}" alt="" srcset="">
                </figure>
            </div>
            {% for spu in cate.spus %}
            <div class="column is-2-fullhd is-3-tablet is-6-mobile">
                {% spu_box spu %}
            </div>
            {% endfor %}
        </div>
        {% endfor %}
    </div>    
{% endblock %}
    